package menu.view 
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import menu.MenuC;
	import org.airmvc.Dispatcher;
	
	/**
	 * ...
	 * @author WLDragon 2014-03-15
	 */
	public class MenuItem extends Sprite 
	{
		
		public function MenuItem(index:int) 
		{
			this.index = index;
			content = new Bitmap();
			addChild(content);
			
			this.mouseChildren = false;
			//this.buttonMode = true;
			this.tabEnabled = false;
		}
		
		public function execute():void
		{
			Dispatcher.send(MenuC.EXE_ORDER,this,order);
		}
		
		public function update(bmd:BitmapData,order:int):void
		{
			this.order = order;
			this.content.bitmapData = bmd;
		}
		
		private var order:int;
		private var content:Bitmap;
		public var index:int;
		
	}

}